package cn.gowss.vnc.utils;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class PropertiesUtils {

	public static String getProperty(String key) {
		Properties properties = new Properties();
	    // 使用ClassLoader加载properties配置文件生成对应的输入流
	    try {
	    	// 使用InPutStream流读取properties文件
	    	BufferedReader in = new BufferedReader(new FileReader("./config/config.properties"));
			properties.load(in);
		} catch (IOException e) {
			e.printStackTrace();
		}
	    //获取key对应的value值
	    return properties.getProperty(key);
	}
}
